package com.sskj.api.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.NonNull;

import java.time.LocalDateTime;

@Data
@Schema(description = "产品物模型")
@TableName("product_things_model")
public class ProductThingsModel {

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @TableField("product_id")
    @NotNull(message = "产品ID不能为空")
    private Long productId;

    @TableField("template_id")
    @NotNull(message = "物模型ID不能为空")
    private Long templateId;

    @TableField("sort_order")
    private Integer sortOrder;

    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
}
